home *** CD-ROM | disk | FTP | other *** search
/ Workbench Add-On / Workbench Add-On - Volume 1.iso / Dev / Triton / Developer / M2Amiga / Demo2.mod < prev    next >
Text File  |  1995-06-28  |  21KB  |  666 lines

  1. (* REVISION HEADER ×××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××× *
  2.  | 
  3.  | $VER: Demo.mod 1.00 (06.09.94) by Stefan Schulz
  4.  | 
  5.  | Module          : Demo
  6.  | Last Modified   : Tuesday, 06.09.94
  7.  | Author          : Stefan Schulz
  8.  | Actual Revision : 1.00
  9.  | 
  10.  | 
  11.  | Description
  12.  | -----------
  13.  |   - Nonfunctional User Interface as Demonstration
  14.  | 
  15.  | Requirements
  16.  | ------------
  17.  |   - triton.library V1.1
  18.  | 
  19.  | Language
  20.  | --------
  21.  |   - M2Amiga Modula 2 Software Development System
  22.  |     © Copyright by A+L AG, CH-2540 Grenchen
  23.  | 
  24.  | Revision 1.00  \06.09.94\
  25.  |  - initial revision
  26.  |   
  27.  * ×××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××× *)
  28.  
  29. MODULE Demo2;
  30.  
  31. (* IMPORTS ********************************************************************** *)
  32.  
  33. IMPORT    td    : TritonD,
  34.     tl    : TritonL;
  35.  
  36. IMPORT    A    : Arts,
  37.     ed    : ExecD,
  38.     id    : IntuitionD,
  39.     S    : SYSTEM,
  40.     ud    : UtilityD;
  41.  
  42. (* ****************************************************************************** *)
  43.  
  44. (* --- Objects ------------------------------------------------------------------ *)
  45.  
  46. VAR    App        : td.TrAppPtr;
  47.     Project        : td.TrProjectPtr;
  48.  
  49. VAR    AppBuffer    : ARRAY [0..3] OF ud.TagItem;
  50.     ProjectBuffer    : ARRAY [0..371] OF ud.TagItem;
  51.  
  52. TYPE    CatEntries    =
  53.         (
  54.         (* Working-Modes *)
  55.          wmknCheckmark,
  56.          wmknCycle,
  57.          wmdtCheckmark,
  58.          wmdtEntry,
  59.          wmttCheckmark,
  60.          wmddCheckmark,
  61.          wmimCheckmark,
  62.          wmcsCheckmark,
  63.          wmidCheckmark,
  64.          wmidSlider,
  65.          wmstCheckmark,
  66.          wmstEntry,
  67.         
  68.         (* Source *)
  69.         sGroup,
  70.         sSelected,
  71.         sImageOnly,
  72.         sName,
  73.         
  74.         (* Destination *)
  75.         dGroup,
  76.         dName,
  77.         
  78.         (* Menu *)
  79.          miOpenIcon,
  80.          miSaveIcon,
  81.          miSaveIconAs,
  82.          miSaveDefault,
  83.           misdDisk,
  84.           misdDrawer,
  85.           misdTool,
  86.           misdProject,
  87.           misdGarbage,
  88.           misdKick,
  89.          miAbout,
  90.          miQuit,
  91.          miDropGoesDest,
  92.          miDropActivates,
  93.          miNoIconPos,
  94.          miSaveInfo,
  95.          miRequestDest,
  96.          miLabelO1,
  97.          miLoadOptions,
  98.          miSaveOptions,
  99.          miLoadBrush,
  100.          miSaveAsBrush,
  101.          miToolTypes,
  102.          miDrawerData,
  103.          miColorSwap,
  104.          miInformation
  105.         );
  106.  
  107. (* --- NameLists for Cycle and Registers ---------------------------------------- *)
  108.  
  109. TYPE    KindList    = ARRAY [0..5] OF S.ADDRESS;
  110.     SourceList    = ARRAY [0..2] OF S.ADDRESS;
  111.  
  112. VAR    kindList    := KindList
  113.     { S.ADR("Disk"),
  114.       S.ADR("Drawer"),
  115.       S.ADR("Tool"),
  116.       S.ADR("Project"),
  117.       S.ADR("Garbage"),
  118.       NIL
  119.     }; (* KindList *)
  120.     
  121.     sourceList    := SourceList
  122.     { S.ADR("Normal"),
  123.       S.ADR("Selected"),
  124.       NIL
  125.     }; (* SourceList *)
  126.  
  127.  
  128. PROCEDURE InitApplication;
  129.  
  130.  BEGIN
  131.  
  132.  App:= tl.CreateApp
  133.     ( S.TAG(AppBuffer,
  134.         td.trcaName,     S.ADR("M2AmigaDemo"),
  135.         td.trcaLongName, S.ADR("M2Amiga Demo Application"),
  136.         td.trcaVersion,  S.ADR("1.0"),
  137.       ud.tagDone)
  138.     ); (* CreateApp *)
  139.  
  140.  A.Assert(App#NIL, S.ADR("Couldn't create Application!"));
  141.  
  142.  END InitApplication;
  143.  
  144.  
  145. PROCEDURE InitProject;
  146.  
  147.  BEGIN
  148.  
  149.  Project:= tl.OpenProject
  150.     ( App,
  151.       S.TAG(ProjectBuffer,
  152.         td.trwiTitle,    S.ADR("ReIcon V3.00 / Nonfunctional Demo"),
  153.         td.trwiID,       1,
  154.         td.trwiPosition, td.trwpCENTERDISPLAY,
  155.         
  156.         
  157.         td.trmnTitle,    S.ADR("Project"),
  158.           td.trmnItem,    S.ADR("o_Open Icon..."),
  159.                 td.tratID, miOpenIcon,
  160.           td.trmnItem,    S.ADR("s_Save Icon"),
  161.                 td.tratID, miSaveIcon,
  162.           td.trmnItem,    S.ADR("a_Save Icon as..."),
  163.                 td.tratID, miSaveIconAs,
  164.           td.trmnItem,    S.ADR("Save Default"),
  165.             td.trmnSub,    S.ADR("Disk"),
  166.                 td.tratID, misdDisk,
  167.             td.trmnSub,    S.ADR("Drawer"),
  168.                 td.tratID, misdDrawer,
  169.             td.trmnSub,    S.ADR("Tool"),
  170.                 td.tratID, misdTool,
  171.             td.trmnSub,    S.ADR("Project"),
  172.                 td.tratID, misdProject,
  173.             td.trmnSub,    S.ADR("Garbage"),
  174.                 td.tratID, misdGarbage,
  175.             td.trmnSub,    S.ADR("Kick / NDOS"),
  176.                 td.tratID, misdKick,
  177.           td.trmnItem,    td.trmnBARLABEL,
  178.           td.trmnItem,    S.ADR("?_About"),
  179.                 td.tratID, miAbout,
  180.           td.trmnItem,    td.trmnBARLABEL,
  181.           td.trmnItem,    S.ADR("q_Quit"),
  182.                 td.tratID, miQuit,
  183.         
  184.         td.trmnTitle,    S.ADR("Options"),
  185.           td.trmnItem,    S.ADR("1_Drop goes Destination"),
  186.                 td.tratID, miDropGoesDest,
  187.           td.trmnItem,    S.ADR("2_Drop Activates"),
  188.                 td.tratID, miDropActivates,
  189.           td.trmnItem,    S.ADR("3_No Icon Position"),
  190.                 td.tratID, miNoIconPos,
  191.           td.trmnItem,    S.ADR("4_Save Information"),
  192.                 td.tratID, miSaveInfo,
  193.           td.trmnItem,    S.ADR("5_Request on Destination"),
  194.                 td.tratID, miRequestDest,
  195.           td.trmnItem,    td.trmnBARLABEL,
  196.           td.trmnItem,    S.ADR("Load Options"),
  197.                 td.tratID, miLoadOptions,
  198.           td.trmnItem,    S.ADR("Save Options"),
  199.                 td.tratID, miSaveOptions,
  200.         
  201.         td.trmnTitle,    S.ADR("Images"),
  202.           td.trmnItem,    S.ADR("Load Brush..."),
  203.                 td.tratID, miLoadBrush,
  204.           td.trmnItem,    S.ADR("Save as Brush..."),
  205.                 td.tratID, miSaveAsBrush,
  206.         
  207.         td.trmnTitle,    S.ADR("Pages"),
  208.           td.trmnItem,    S.ADR("t_ToolTypes"),
  209.                 td.tratID, miToolTypes,
  210.           td.trmnItem,    S.ADR("d_Drawer Data"),
  211.                 td.tratID, miDrawerData,
  212.           td.trmnItem,    S.ADR("c_ColorSwap"),
  213.                 td.tratID, miColorSwap,
  214.           td.trmnItem,    S.ADR("i_Information"),
  215.                 td.tratID, miInformation,
  216.         
  217.         (* ··· Main Group ··············································· *)
  218.         td.trgrVert,    td.trgrALIGN+td.trgrEQUALSHARE+td.trgrPROPSPACES,
  219.         td.trobSpace,    td.trstSMALL,
  220.         td.trgrHoriz,    td.trgrEQUALSHARE+td.trgrCENTER+td.trgrPROPSPACES,
  221.         td.trobSpace,    td.trstSMALL,
  222.         
  223.           (* ··· Mode Group ············································· *)
  224.           td.trobFrameBox,  NIL,
  225.                     td.tratText,  S.ADR("Mode"),
  226.           td.trgrVert,        td.trgrALIGN+td.trgrEQUALSHARE+td.trgrPROPSPACES,
  227.           td.trobSpace,        td.trstSMALL,
  228.           
  229.             (* ··· Kind Group ··········································· *)
  230.             td.trgrHoriz,    td.trgrCENTER+td.trgrPROPSHARE,
  231.               td.trobSpace,    td.trstSMALL,
  232.               td.trobCheckBox,    NIL,
  233.                     td.tratID,   wmknCheckmark,
  234.               td.trobSpace,    td.trstSMALL,
  235.               td.trgrVert,      td.trgrALIGN,
  236.             td.trobSpace,      td.trstSMALL,
  237.             td.trgrHoriz,        td.trgrALIGN,
  238.               td.trobSpace,        td.trstSMALL,
  239.               td.trobText,        NIL,
  240.                         td.tratText, S.ADR("_Kind"),
  241.                         td.tratID,   wmknCheckmark,
  242.               td.trobSpace,        td.trstBIG,
  243.             td.trgrEnd,        NIL,
  244.             td.trobSpace,      td.trstSMALL,
  245.             td.trobCycle,      S.ADR(kindList),
  246.                       td.tratID,    wmknCycle,
  247.                       td.tratValue, NIL,
  248.             td.trobSpace,      td.trstSMALL,
  249.               td.trgrEnd,      NIL,
  250.               td.trobSpace,    td.trstSMALL,
  251.             td.trgrEnd,        NIL,
  252.             (* ··· END Kind Group ······································· *)
  253.             
  254.             (* ··· Separator ············································ *)
  255.             td.trobSpace,    td.trstSMALL,
  256.             td.trgrHoriz,    td.trgrEQUALSHARE+td.trgrCENTER,
  257.             td.trobSpace,    td.trstSMALL,
  258.             td.trobLine,    td.trofHORIZ,
  259.             td.trobSpace,    td.trstSMALL,
  260.             td.trgrEnd,        NIL,
  261.             td.trobSpace,    td.trstSMALL,
  262.             (* ··· END Separator ········································ *)
  263.             
  264.             (* ··· Default Tool Group ··································· *)
  265.             td.trgrHoriz,    td.trgrCENTER+td.trgrPROPSHARE,
  266.               td.trobSpace,    td.trstSMALL,
  267.               td.trobCheckBox,    NIL,
  268.                     td.tratID,   wmdtCheckmark,
  269.               td.trobSpace,    td.trstSMALL,
  270.               td.trgrVert,      td.trgrALIGN,
  271.             td.trobSpace,      td.trstSMALL,
  272.             td.trgrHoriz,        td.trgrALIGN,
  273.               td.trobSpace,        td.trstSMALL,
  274.               td.trobText,        NIL,
  275.                         td.tratText, S.ADR("De_fault Tool"),
  276.                         td.tratID,   wmdtCheckmark,
  277.               td.trobSpace,        td.trstBIG,
  278.             td.trgrEnd,        NIL,
  279.             td.trobSpace,      td.trstSMALL,
  280.             td.trobString,      S.ADR("Command"),
  281.                       td.tratID, wmdtEntry,
  282.             td.trobSpace,      td.trstSMALL,
  283.               td.trgrEnd,      NIL,
  284.               td.trobSpace,    td.trstSMALL,
  285.             td.trgrEnd,        NIL,
  286.             (* ··· END Default Tool Group ······························· *)
  287.             
  288.             (* ··· Separator ············································ *)
  289.             td.trobSpace,    td.trstSMALL,
  290.             td.trgrHoriz,    td.trgrEQUALSHARE+td.trgrCENTER,
  291.             td.trobSpace,    td.trstSMALL,
  292.             td.trobLine,    td.trofHORIZ,
  293.             td.trobSpace,    td.trstSMALL,
  294.             td.trgrEnd,        NIL,
  295.             td.trobSpace,    td.trstSMALL,
  296.             (* ··· END Separator ········································ *)
  297.             
  298.             (* ··· ToolTypes Group ······································ *)
  299.             td.trgrHoriz,    td.trgrCENTER+td.trgrPROPSHARE,
  300.               td.trobSpace,    td.trstSMALL,
  301.               td.trobCheckBox,    NIL,
  302.                     td.tratID,   wmttCheckmark,
  303.               td.trobSpace,    td.trstSMALL,
  304.               td.trgrVert,      td.trgrALIGN,
  305.             td.trobSpace,      td.trstSMALL,
  306.             td.trgrHoriz,        td.trgrALIGN,
  307.               td.trobSpace,        td.trstSMALL,
  308.               td.trobText,        NIL,
  309.                         td.tratText, S.ADR("_ToolTypes"),
  310.                         td.tratID,   wmttCheckmark,
  311.               td.trobSpace,        td.trstBIG,
  312.             td.trgrEnd,        NIL,
  313.             td.trobSpace,      td.trstSMALL,
  314.               td.trgrEnd,      NIL,
  315.             td.trobSpace,    td.trstSMALL,
  316.             td.trgrEnd,        NIL,
  317.             (* ··· END ToolTypes Group ·································· *)
  318.             
  319.             (* ··· Separator ············································ *)
  320.             td.trobSpace,    td.trstSMALL,
  321.             td.trgrHoriz,    td.trgrEQUALSHARE+td.trgrCENTER,
  322.             td.trobSpace,    td.trstSMALL,
  323.             td.trobLine,    td.trofHORIZ,
  324.             td.trobSpace,    td.trstSMALL,
  325.             td.trgrEnd,        NIL,
  326.             td.trobSpace,    td.trstSMALL,
  327.             (* ··· END Separator ········································ *)
  328.             
  329.             (* ··· Image Group ·········································· *)
  330.             td.trgrHoriz,    td.trgrCENTER+td.trgrPROPSHARE,
  331.               td.trobSpace,    td.trstSMALL,
  332.               td.trobCheckBox,    NIL,
  333.                     td.tratID,   wmimCheckmark,
  334.               td.trobSpace,    td.trstSMALL,
  335.               td.trgrVert,      td.trgrALIGN,
  336.             td.trobSpace,      td.trstSMALL,
  337.             td.trgrHoriz,        td.trgrALIGN,
  338.               td.trobSpace,        td.trstSMALL,
  339.               td.trobText,        NIL,
  340.                         td.tratText, S.ADR("_Image"),
  341.                         td.tratID,   wmimCheckmark,
  342.               td.trobSpace,        td.trstBIG,
  343.             td.trgrEnd,        NIL,
  344.             td.trobSpace,      td.trstSMALL,
  345.               td.trgrEnd,      NIL,
  346.             td.trobSpace,    td.trstSMALL,
  347.             td.trgrEnd,        NIL,
  348.             (* ··· END ToolTypes Group ·································· *)
  349.             
  350.             (* ··· Separator ············································ *)
  351.             td.trobSpace,    td.trstSMALL,
  352.             td.trgrHoriz,    td.trgrEQUALSHARE+td.trgrCENTER,
  353.             td.trobSpace,    td.trstSMALL,
  354.             td.trobLine,    td.trofHORIZ,
  355.             td.trobSpace,    td.trstSMALL,
  356.             td.trgrEnd,        NIL,
  357.             td.trobSpace,    td.trstSMALL,
  358.             (* ··· END Separator ········································ *)
  359.             
  360.             (* ··· Drawer Data Group ···································· *)
  361.             td.trgrHoriz,    td.trgrCENTER+td.trgrPROPSHARE,
  362.               td.trobSpace,    td.trstSMALL,
  363.               td.trobCheckBox,    NIL,
  364.                     td.tratID,   wmddCheckmark,
  365.               td.trobSpace,    td.trstSMALL,
  366.               td.trgrVert,      td.trgrALIGN,
  367.             td.trobSpace,      td.trstSMALL,
  368.             td.trgrHoriz,        td.trgrALIGN,
  369.               td.trobSpace,        td.trstSMALL,
  370.               td.trobText,        NIL,
  371.                         td.tratText, S.ADR("_Drawer Data"),
  372.                         td.tratID,   wmddCheckmark,
  373.               td.trobSpace,        td.trstBIG,
  374.             td.trgrEnd,        NIL,
  375.             td.trobSpace,      td.trstSMALL,
  376.               td.trgrEnd,      NIL,
  377.             td.trobSpace,    td.trstSMALL,
  378.             td.trgrEnd,        NIL,
  379.             (* ··· END Drawer Data Group ································ *)
  380.             
  381.             (* ··· Separator ············································ *)
  382.             td.trobSpace,    td.trstSMALL,
  383.             td.trgrHoriz,    td.trgrEQUALSHARE+td.trgrCENTER,
  384.             td.trobSpace,    td.trstSMALL,
  385.             td.trobLine,    td.trofHORIZ,
  386.             td.trobSpace,    td.trstSMALL,
  387.             td.trgrEnd,        NIL,
  388.             td.trobSpace,    td.trstSMALL,
  389.             (* ··· END Separator ········································ *)
  390.             
  391.             (* ··· ImageDepth Group ····································· *)
  392.             td.trgrHoriz,    td.trgrCENTER+td.trgrPROPSHARE,
  393.               td.trobSpace,    td.trstSMALL,
  394.               td.trobCheckBox,    NIL,
  395.                     td.tratID,   wmidCheckmark,
  396.               td.trobSpace,    td.trstSMALL,
  397.               td.trgrVert,      td.trgrALIGN,
  398.             td.trobSpace,      td.trstSMALL,
  399.             td.trgrHoriz,        td.trgrALIGN,
  400.               td.trobSpace,        td.trstSMALL,
  401.               td.trobText,        NIL,
  402.                         td.tratText, S.ADR("Ima_ge Depth"),
  403.                         td.tratID,   wmidCheckmark,
  404.               td.trobSpace,        td.trstBIG,
  405.             td.trgrEnd,        NIL,
  406.             td.trobSpace,      td.trstSMALL,
  407.             td.trobSlider,      td.trofHORIZ,
  408.                       td.tratID,    wmidSlider,
  409.                       td.tratValue, 3,
  410.                       td.trslMin,   1,
  411.                       td.trslMax,   5,
  412.             td.trobSpace,      td.trstSMALL,
  413.               td.trgrEnd,      NIL,
  414.             td.trobSpace,    td.trstSMALL,
  415.             td.trgrEnd,        NIL,
  416.             (* ··· END ImageDepth Group ································· *)
  417.             
  418.             (* ··· Separator ············································ *)
  419.             td.trobSpace,    td.trstSMALL,
  420.             td.trgrHoriz,    td.trgrEQUALSHARE+td.trgrCENTER,
  421.             td.trobSpace,    td.trstSMALL,
  422.             td.trobLine,    td.trofHORIZ,
  423.             td.trobSpace,    td.trstSMALL,
  424.             td.trgrEnd,        NIL,
  425.             td.trobSpace,    td.trstSMALL,
  426.             (* ··· END Separator ········································ *)
  427.             
  428.             (* ··· Stack Group ·········································· *)
  429.             td.trgrHoriz,    td.trgrCENTER+td.trgrPROPSHARE,
  430.               td.trobSpace,    td.trstSMALL,
  431.               td.trobCheckBox,    NIL,
  432.                     td.tratID,   wmstCheckmark,
  433.               td.trobSpace,    td.trstSMALL,
  434.               td.trgrVert,      td.trgrALIGN+td.trgrPROPSHARE,
  435.             td.trobSpace,      td.trstSMALL,
  436.             td.trgrHoriz,        td.trgrALIGN+td.trgrPROPSPACES,
  437.               td.trobText,        NIL,
  438.                         td.tratText, S.ADR("_Stack"),
  439.                         td.tratID,   wmstCheckmark,
  440.               td.trobSpace,        td.trstBIG,
  441.             td.trgrEnd,        NIL,
  442.             td.trobSpace,      td.trstSMALL,
  443.             td.trobString,      S.ADR("4096"),
  444.                       td.tratID,    wmstEntry,
  445.                       td.tratValue, 11,
  446.             td.trobSpace,      td.trstSMALL,
  447.               td.trgrEnd,      NIL,
  448.             td.trobSpace,    td.trstSMALL,
  449.             td.trgrEnd,        NIL,
  450.             (* ··· END Stack Group ······································ *)
  451.             
  452.           td.trobSpace,        td.trstSMALL,
  453.           td.trgrEnd,        NIL,
  454.           (* ··· END Mode Group ········································· *)
  455.           
  456.           
  457.           (* ··· Selection Group ········································ *)
  458.           td.trgrVert,        td.trgrALIGN+td.trgrPROPSHARE+td.trgrPROPSPACES,
  459.           td.trobSpace,        td.trstSMALL,
  460.           
  461.             (* ··· Pages Group ·········································· *)
  462.             td.trobFrameBox, td.trfbFRAMING,
  463.                      td.tratText, S.ADR("Windows"),
  464.             td.trgrHoriz,    td.trgrALIGN+td.trgrEQUALSHARE,
  465.             td.trobSpace,    td.trstSMALL,
  466.             td.trgrVert,     td.trgrALIGN+td.trgrEQUALSHARE,
  467.             td.trobSpace,    td.trstSMALL,
  468.             
  469.               (* ··· ToolType-Page-Selector ····························· *)
  470.               td.trgrHoriz,       td.trgrALIGN+td.trgrCENTER,
  471.               td.trobSpace,       td.trstSMALL,
  472.             td.trobButton,      td.trbtTEXT,
  473.                       td.tratText,  S.ADR("T_oolTypes"),
  474.                       td.tratID,    miToolTypes,
  475.                       td.tratFlags, td.trbuYRESIZE,
  476.               td.trobSpace,      td.trstSMALL,
  477.               td.trgrEnd,      NIL,
  478.               (* ··· END ToolType-Page-Selector ························· *)
  479.             
  480.               td.trobSpace,    td.trstSMALL,
  481.             
  482.               (* ··· DrawerData-Page-Selector ··························· *)
  483.               td.trgrHoriz,       td.trgrALIGN+td.trgrCENTER,
  484.               td.trobSpace,       td.trstSMALL,
  485.             td.trobButton,      td.trbtTEXT,
  486.                       td.tratText,  S.ADR("D_rawer Data"),
  487.                       td.tratID,    miDrawerData,
  488.                       td.tratFlags, td.trbuYRESIZE,
  489.               td.trobSpace,      td.trstSMALL,
  490.               td.trgrEnd,      NIL,
  491.               (* ··· END DrawerData-Page-Selector ······················· *)
  492.             
  493.               td.trobSpace,    td.trstSMALL,
  494.             
  495.               (* ··· ColorSwap-Page-Selector ···························· *)
  496.               td.trgrHoriz,       td.trgrALIGN+td.trgrCENTER,
  497.               td.trobSpace,       td.trstSMALL,
  498.             td.trobButton,      td.trbtTEXT,
  499.                       td.tratText,  S.ADR("Co_lorSwap"),
  500.                       td.tratID,    miColorSwap,
  501.                       td.tratFlags, td.trbuYRESIZE,
  502.               td.trobSpace,      td.trstSMALL,
  503.               td.trgrEnd,      NIL,
  504.               (* ··· END ColorSwap-Page-Selector ························ *)
  505.             
  506.               td.trobSpace,    td.trstSMALL,
  507.             
  508.               (* ··· Information-Page-Selector ·························· *)
  509.               td.trgrHoriz,       td.trgrALIGN+td.trgrCENTER,
  510.               td.trobSpace,       td.trstSMALL,
  511.             td.trobButton,      td.trbtTEXT,
  512.                       td.tratText,  S.ADR("I_nformation"),
  513.                       td.tratID,    miInformation,
  514.                       td.tratFlags, td.trbuYRESIZE,
  515.               td.trobSpace,      td.trstSMALL,
  516.               td.trgrEnd,      NIL,
  517.               (* ··· END Information-Page-Selector ······················ *)
  518.             
  519.             td.trobSpace,      td.trstSMALL,
  520.             td.trgrEnd,           NIL,
  521.             td.trobSpace,      td.trstSMALL,
  522.             td.trgrEnd,           NIL,
  523.             (* ··· END Pages Group ······································ *)
  524.           
  525.             (* ··· Icon Group ··········································· *)
  526.             td.trgrHoriz,    td.trgrALIGN+td.trgrEQUALSHARE+td.trgrPROPSPACES,
  527.             td.trobSpace,    td.trstSMALL,
  528.               
  529.               (* ··· Source Group ······································· *)
  530.               td.trobFrameBox,    td.trfbFRAMING,
  531.                     td.tratText, S.ADR("Source"),
  532.               td.trgrHoriz,    td.trgrALIGN+td.trgrEQUALSHARE+td.trgrPROPSPACES,
  533.               td.trobSpace,    td.trstSMALL,
  534.               td.trgrVert,    td.trgrALIGN+td.trgrPROPSHARE+td.trgrPROPSPACES,
  535.               td.trobSpace,    td.trstSMALL,
  536.               
  537.             td.trobDropBox,      NIL,
  538.                       td.tratID, sGroup,
  539.             td.trobSpace,      td.trstSMALL,
  540.             td.trobCycle,      S.ADR(sourceList),
  541.                       td.tratID,    sSelected,
  542.                       td.tratValue, 0,
  543.             td.trobSpace,      td.trstSMALL,
  544.             td.trgrHoriz,         td.trgrALIGN+td.trgrPROPSPACES,
  545.               td.trobCheckBox,  NIL,
  546.                         td.tratID, sImageOnly,
  547.               td.trobSpace,     td.trstNORMAL,
  548.               td.trobText,        NIL,
  549.                         td.tratText, S.ADR("Image Onl_y"),
  550.                         td.tratID,   sName,
  551.               td.trobSpace,        td.trstBIG,
  552.               td.trobSpace,        td.trstBIG,
  553.             td.trgrEnd,        NIL,
  554.             td.trobSpace,      td.trstSMALL,
  555.             td.trobFrameBox,  td.trfbTEXT,
  556.             td.trgrHoriz,        td.trgrALIGN+td.trgrPROPSPACES,
  557.               td.trobSpace,        td.trstBIG,
  558.               td.trobText,        NIL,
  559.                         td.tratText, S.ADR("SourceName"),
  560.                         td.tratID,   sName,
  561.               td.trobSpace,        td.trstBIG,
  562.             td.trgrEnd,        NIL,
  563.               
  564.               td.trobSpace,    td.trstSMALL,
  565.               td.trgrEnd,    NIL,
  566.               td.trobSpace,    td.trstSMALL,
  567.               td.trgrEnd,    NIL,
  568.               (* ··· END Source Group ··································· *)
  569.               
  570.             td.trobSpace,     td.trstSMALL,
  571.             
  572.               (* ··· Destination Group ·································· *)
  573.               td.trobFrameBox,    td.trfbFRAMING,
  574.                     td.tratText, S.ADR("Destination"),
  575.               td.trgrHoriz,    td.trgrALIGN+td.trgrPROPSPACES,
  576.               td.trobSpace,    td.trstSMALL,
  577.               td.trgrVert,    td.trgrALIGN,
  578.               td.trobSpace,    td.trstSMALL,
  579.               
  580.             td.trobDropBox,      NIL,
  581.                       td.tratID, dGroup,
  582.             td.trobSpace,      td.trstSMALL,
  583.             td.trobFrameBox,  td.trfbTEXT,
  584.             td.trgrHoriz,        td.trgrALIGN,
  585.               td.trobSpace,        td.trstBIG,
  586.               td.trobText,        NIL,
  587.                         td.tratText, S.ADR("DestName"),
  588.                         td.tratID,   dName,
  589.               td.trobSpace,        td.trstBIG,
  590.             td.trgrEnd,        NIL,
  591.               
  592.               td.trobSpace,    td.trstSMALL,
  593.               td.trgrEnd,    NIL,
  594.               td.trobSpace,    td.trstSMALL,
  595.               td.trgrEnd,    NIL,
  596.               (* ··· END Destination Group ······························ *)
  597.               
  598.             td.trobSpace,     td.trstSMALL,
  599.             td.trgrEnd,          NIL,
  600.             (* ··· END Icon Group ······································· *)
  601.           
  602.           td.trobSpace,        td.trstSMALL,
  603.           td.trgrEnd,        NIL,
  604.           (* ··· END Selection Group ···································· *)
  605.           
  606.         td.trobSpace,    td.trstSMALL,
  607.         td.trgrEnd,    NIL,
  608.         td.trobSpace,    td.trstSMALL,
  609.         td.trgrEnd,    NIL,
  610.         (* ··· END Main Group ··········································· *)
  611.         
  612.       ud.tagEnd)
  613.     ); (* OpenProject *)
  614.  
  615.  A.Assert(Project#NIL, S.ADR("Couldn't open Project!"));
  616.  
  617.  END InitProject;
  618.  
  619.  
  620. VAR    trMsg    : td.TrMessagePtr;
  621.     quit    : BOOLEAN;
  622.  
  623. BEGIN
  624.  
  625. InitApplication;
  626. InitProject;
  627.  
  628. quit:= FALSE;
  629. WHILE    ~quit
  630.  DO    (* --- Wait for a Message ----------------------------------------------- *)
  631.     IGNORE tl.Wait( App, 0 );
  632.     
  633.     (* --- Eval Messages as long as one appears ----------------------------- *)
  634.     trMsg:= tl.GetMsg( App );
  635.     WHILE    (trMsg # NIL)
  636.      DO    (* --- Only take care if it's for our Project ------------------- *)
  637.         IF    (trMsg^.project = Project)
  638.          THEN    CASE trMsg^.class OF
  639.              | td.trmsCLOSEWINDOW :
  640.                 quit:= TRUE;
  641.              ELSE    (* unknown code *)
  642.              END; (* case *)
  643.          END; (* if *)
  644.         
  645.         (* --- Answer the Message and get next -------------------------- *)
  646.         tl.ReplyMsg( trMsg );
  647.         trMsg:= tl.GetMsg( App );
  648.         
  649.      END; (* while *)
  650.  END; (* while *)
  651.  
  652.  
  653. CLOSE
  654.  
  655. IF    Project # NIL
  656.  THEN    tl.CloseProject(Project);
  657.     Project:= NIL;
  658.  END;
  659.  
  660. IF    App # NIL
  661.  THEN    tl.DeleteApp(App);
  662.     App:= NIL;
  663.  END;
  664.  
  665. END Demo2.
  666.